home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / var / lib / dpkg / info / fontconfig-config.postinst < prev    next >
Encoding:
Text File  |  2010-04-17  |  1.7 KB  |  102 lines

  1. #!/bin/sh
  2.  
  3. set -e
  4.  
  5. . /usr/share/debconf/confmodule
  6.  
  7. # Remove old ucf stuff
  8. rm -rf /var/lib/fontconfig
  9.  
  10. CONFAVAIL=/etc/fonts/conf.avail
  11. CONFDIR=/etc/fonts/conf.d
  12.  
  13. # Add the defoma configuration
  14. defoma_link="30-defoma.conf"
  15. ln -sf /var/lib/defoma/fontconfig.d/fonts.conf $CONFDIR/$defoma_link
  16.  
  17. db_get fontconfig/hinting_type
  18. hinting_type="$RET"
  19.  
  20. unhinted="10-unhinted.conf"
  21. autohint="10-autohint.conf"
  22.  
  23. if [ -h $CONFDIR/$unhinted ]; then
  24.     rm $CONFDIR/$unhinted
  25. fi
  26. if [ -h $CONFDIR/$autohint ]; then
  27.     rm $CONFDIR/$autohint
  28. fi
  29.     
  30. case "$hinting_type" in
  31. "Native")
  32.     ;;
  33. "Autohinter")
  34.     ln -s $CONFAVAIL/$autohint $CONFDIR/$autohint
  35.     ;;
  36. "None")
  37.     ln -s $CONFAVAIL/$unhinted $CONFDIR/$unhinted
  38.     ;;
  39. esac
  40.  
  41.  
  42. db_get fontconfig/subpixel_rendering
  43. subpixel_rendering="$RET"
  44.  
  45. subpixel="10-sub-pixel-rgb.conf"
  46. no_subpixel="10-no-sub-pixel.conf"
  47.  
  48. if [ -h $CONFDIR/$subpixel ]; then
  49.     rm $CONFDIR/$subpixel
  50. fi
  51.  
  52. if [ -h $CONFDIR/$no_subpixel ]; then
  53.     rm $CONFDIR/$no_subpixel
  54. fi
  55.  
  56. case "$subpixel_rendering" in
  57. "Automatic")
  58.     ;;
  59. "Always")
  60.     ln -s $CONFAVAIL/$subpixel $CONFDIR/$subpixel
  61.     ;;
  62. "Never")
  63.     ln -s $CONFAVAIL/$no_subpixel $CONFDIR/$no_subpixel
  64.     ;;
  65. esac
  66.  
  67.  
  68. db_get fontconfig/enable_bitmaps
  69. enable_bitmaps="$RET"
  70.  
  71. yes_bitmaps="70-yes-bitmaps.conf"
  72. no_bitmaps="70-no-bitmaps.conf"
  73.  
  74. if [ -h $CONFDIR/$yes_bitmaps ]; then
  75.     rm $CONFDIR/$yes_bitmaps
  76. fi
  77.  
  78. if [ -h $CONFDIR/$no_bitmaps ]; then
  79.     rm $CONFDIR/$no_bitmaps
  80. fi
  81.  
  82. case "$enable_bitmaps" in
  83. "true")
  84.     ln -s $CONFAVAIL/$yes_bitmaps $CONFDIR/$yes_bitmaps
  85.     ;;
  86. *)
  87.     ln -s $CONFAVAIL/$no_bitmaps $CONFDIR/$no_bitmaps
  88.     ;;
  89. esac
  90.  
  91.  
  92. # Create /usr/local/share/fonts
  93. LOCALDIR=/usr/local/share/fonts
  94. if [ ! -d $LOCALDIR ]; then
  95.   if mkdir $LOCALDIR 2>/dev/null ; then
  96.     chmod 2775 $LOCALDIR
  97.     chown root:staff $LOCALDIR
  98.   fi
  99. fi
  100.  
  101.  
  102.